<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts::header"></head>

<body>
<nav th:replace="layouts::navbar"></nav>
<div class="container">
    <h3>项目列表</h3>
    <hr>
    <!--    新增项目列表-->
    <a th:href="@{/students/new}" class="btn btn-primary btn-sm mb-3">新增项目</a>
    <br>
    <table class="table table-bordered table-striped">
        <thead class="table-dark">
        <tr>
            <th>项目名称</th>
            <th>项目状态</th>
            <th>动作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="aStudent:${student}">
            <td th:text="${aStudent.name}"></td>
            <td th:text="${aStudent.wechatId}"></td>
            <td th:text="${aStudent.email}"></td>
            <td>
                <a th:href="@{/students/update(id=${aStudent.studentId})}" class="btn btn-info btn-sm">更新</a>
                <a
                         th:href="@{/students/delete(id=${aStudent.studentId})}"
                         class="btn btn-danger ben-sm"
                         onclick="if(!(confirm('你确定要去删除这个学生妈妈'))) return false"
                >删除</a>
            </td>
        </tr>
        </tbody>
    </table>

</div>
</body>
</html>